1 # -*- coding: utf-8 -*-
2 ##############################################################################
4 # Bikecoop_l10n_fr module for OpenERP, French specifities for bikecoop
5 # funtionnalities Copyright (C) 2012-2015 L'Heureux Cyclage
6 # (<http://www.heureux-cyclage.org>)
8 # This file is a part of Bikecoop_l10n_fr
10 # Bikecoop_l10n_fr is free software: you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation, either version 3 of the License, or
13 # (at your option) any later version.
15 # Bikecoop_l10n_fr is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with this program. If not, see <http://www.gnu.org/licenses/>.
23 ##############################################################################
25 from openerp
.osv
import osv
26 from openerp
.osv
import fields
29 class Partner(osv
.osv
):
30 _inherit
= 'res.partner'
32 def _default_country(self
, cr
, uid
, context
=None):
35 country_obj
= self
.pool
.get('res.country')
36 country
= country_obj
.search(cr
, uid
, [('name', '=', 'France')], context
=context
)
39 def _default_nationality(self
, cr
, uid
, context
=None):
42 nationality_obj
= self
.pool
.get('res.country')
43 nationality
= nationality_obj
.search(cr
, uid
, [('name', '=', 'France')], context
=context
)
47 'country_id': _default_country
,
48 'nationality_id': _default_nationality
,
52 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: